import { BASE_URL } from '@/config/public'
import { METHOD, request } from '@/utils/request'

export default {
  // 首页榜单头条
  getFirstPage: params => {
    return request(
      `${BASE_URL}/provider/ims/ejbb/firstpage/month/top5`,
      METHOD.GET,
      params,
      { isNeedToken: false }
    )
  },
  // 首页产品列表
  getprodListInHome: params => {
    return request(
      `${BASE_URL}/provider/ims/ejbb/firstpage/product/list`,
      METHOD.GET,
      params,
      { isNeedToken: false }
    )
  },
  // 榜单排名明细
  getTopDetail: params => {
    return request(
      `${BASE_URL}/provider/ims/ejbb/firstpage/month/top/list`,
      METHOD.POST_JSON_ENCRYPT,
      params,
      { isNeedToken: false }
    )
  },
  // 首页未读消息
  getMsg: params => {
    return request(
      `${BASE_URL}/provider/ims/ejbb/firstpage/message/count/unread`,
      METHOD.GET,
      params,
      { isNeedToken: false }
    )
  }
}
